import {FriendModel} from "../../models/friend.js";
var _FriendModel = new FriendModel();
Component({
  /**
   * 组件的属性列表
   */
  properties: {
      showAddFriend:{
        type:Boolean,
        value:true
      },
    showData: {
      type: Object
    }
  },
  data: {

  },
  methods: {
    addFriend:function(e){
      var uid = e.target.dataset.user;
      _FriendModel.addFriend(uid,function(){
        wx.showToast({
          title: "成功发送添加好友请求。",
          icon: 'success',
          duration: 3000
        })
        return;
      })
    }
  }
})
